<!DOCTYPE html>
<html lang="en">
  <head>
    <title>NetWorkTools Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Class/NetWorkTools" class="dashAnchor"></a>
    <a title="NetWorkTools Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html"> Docs</a> (3% documented)</p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html"> Reference</a>
        <img id="carat" src="../img/carat.png" />
        NetWorkTools Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/AppDelegate.html">AppDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmBaseTableViewController.html">JkmBaseTableViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmCollectionCell.html">JkmCollectionCell</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmDiscoverTableViewController.html">JkmDiscoverTableViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmHomeTableViewController.html">JkmHomeTableViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmMainTabBarController.html">JkmMainTabBarController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmMessageTableViewController.html">JkmMessageTableViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmNewfeatureViewController.html">JkmNewfeatureViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmPresentationController.html">JkmPresentationController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmProfileTableViewController.html">JkmProfileTableViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmTabBar.html">JkmTabBar</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmTitleButton.html">JkmTitleButton</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmTitleMenuController.html">JkmTitleMenuController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmVCAnimatedTransitioning.html">JkmVCAnimatedTransitioning</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/JkmWelcomeViewController.html">JkmWelcomeViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/LoginViewController.html">LoginViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/NetWorkTools.html">NetWorkTools</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/UserModel.html">UserModel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ViewModel.html">ViewModel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/VisitorView.html">VisitorView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Global Variables.html">Global Variables</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Global Variables.html#/s:v6SinaWb10ThemeColorCSo7UIColor">ThemeColor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Global Variables.html#/s:v6SinaWb6appkeySS">appkey</a>
              </li>
              <li class="nav-group-task">
                <a href="../Global Variables.html#/s:v6SinaWb9appsecretSS">appsecret</a>
              </li>
              <li class="nav-group-task">
                <a href="../Global Variables.html#/s:v6SinaWb8fileNameSS">fileName</a>
              </li>
              <li class="nav-group-task">
                <a href="../Global Variables.html#/s:v6SinaWb4pathSS">path</a>
              </li>
              <li class="nav-group-task">
                <a href="../Global Variables.html#/s:v6SinaWb3uriSS">uri</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/HTTPRequstMethod.html">HTTPRequstMethod</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/UIBarButtonItem.html">UIBarButtonItem</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIButton.html">UIButton</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Functions.html#/s:F6SinaWb5JkLogurFTxSSSSSi_T_">JkLog(_:_:_:_:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/VisitorViewDelegate.html">VisitorViewDelegate</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>NetWorkTools</h1>
            <p>Undocumented</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <div class="task-name-container">
                <a name="/NetWorkTools%E7%9A%84%E5%8D%95%E4%BE%8B"></a>
                <a name="//apple_ref/swift/Section/NetWorkTools的单例" class="dashAnchor"></a>
                <a href="#/NetWorkTools%E7%9A%84%E5%8D%95%E4%BE%8B">
                  <h3 class="section-name">NetWorkTools的单例</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:ZvC6SinaWb12NetWorkTools16sharNetWorkToolsS0_"></a>
                    <a name="//apple_ref/swift/Variable/sharNetWorkTools" class="dashAnchor"></a>
                    <a class="token" href="#/s:ZvC6SinaWb12NetWorkTools16sharNetWorkToolsS0_">sharNetWorkTools</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/%E5%B0%81%E8%A3%85AFN%20dataTaskWithHTTPMethod"></a>
                <a name="//apple_ref/swift/Section/封装AFN dataTaskWithHTTPMethod" class="dashAnchor"></a>
                <a href="#/%E5%B0%81%E8%A3%85AFN%20dataTaskWithHTTPMethod">
                  <h3 class="section-name">封装AFN dataTaskWithHTTPMethod</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6SinaWb12NetWorkTools7requestFTOS_16HTTPRequstMethod9URLStringSS9parameterPs9AnyObject_5RightFT6resultGSqPS2____T_5WrongFT5ErrorGSqCSo7NSError__T__T_"></a>
                    <a name="//apple_ref/swift/Method/request(_:URLString:parameter:Right:Wrong:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6SinaWb12NetWorkTools7requestFTOS_16HTTPRequstMethod9URLStringSS9parameterPs9AnyObject_5RightFT6resultGSqPS2____T_5WrongFT5ErrorGSqCSo7NSError__T__T_">request(_:URLString:parameter:Right:Wrong:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/1.%20%E8%8E%B7%E5%8F%96code"></a>
                <a name="//apple_ref/swift/Section/1. 获取code" class="dashAnchor"></a>
                <a href="#/1.%20%E8%8E%B7%E5%8F%96code">
                  <h3 class="section-name">1. 获取code</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6SinaWb12NetWorkTools11requstJudgeFCSo12NSURLRequestTSbGSqSS__"></a>
                    <a name="//apple_ref/swift/Method/requstJudge(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6SinaWb12NetWorkTools11requstJudgeFCSo12NSURLRequestTSbGSqSS__">requstJudge(_:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/2.%20%E4%BD%BF%E7%94%A8Code%E8%8E%B7%E5%8F%96Accec_taken,%E5%86%8D%E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7JSON%E6%95%B0%E6%8D%AE"></a>
                <a name="//apple_ref/swift/Section/2. 使用Code获取Accec_taken,再获取用户JSON数据" class="dashAnchor"></a>
                <a href="#/2.%20%E4%BD%BF%E7%94%A8Code%E8%8E%B7%E5%8F%96Accec_taken,%E5%86%8D%E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7JSON%E6%95%B0%E6%8D%AE">
                  <h3 class="section-name">2. 使用Code获取Accec_taken,再获取用户JSON数据</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6SinaWb12NetWorkTools13GetAcessTakenFTSS8parametePs9AnyObject_13UserURLStringSS8CompleteFT8usermodePS1___T_9WithErrorFT6errorsGSqCSo7NSError__T__T_"></a>
                    <a name="//apple_ref/swift/Method/GetAcessTaken(_:paramete:UserURLString:Complete:WithError:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6SinaWb12NetWorkTools13GetAcessTakenFTSS8parametePs9AnyObject_13UserURLStringSS8CompleteFT8usermodePS1___T_9WithErrorFT6errorsGSqCSo7NSError__T__T_">GetAcessTaken(_:paramete:UserURLString:Complete:WithError:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">func</span> <span class="kt">GetAcessTaken</span><span class="p">(</span><span class="kt">AcessTakenURL</span><span class="p">:</span><span class="kt">String</span><span class="p">,</span><span class="nv">paramete</span><span class="p">:</span><span class="kt">AnyObject</span><span class="p">,</span><span class="kt">UserURLString</span><span class="p">:</span><span class="kt">String</span><span class="p">,</span><span class="kt">Complete</span><span class="p">:(</span><span class="nv">usermode</span><span class="p">:</span><span class="kt">AnyObject</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">()</span> <span class="p">,</span> <span class="kt">WithError</span><span class="p">:(</span><span class="nv">errors</span> <span class="p">:</span> <span class="kt">NSError</span><span class="p">?)</span><span class="o">-&gt;</span><span class="p">())</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>code</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Code</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>AcessTakenURL</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>获取Acess_Taken的地址</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>paramete</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>POST请求的字典</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>UserURLString</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>获取用户信息的字典</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>Complete</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>完成回调函数</p>

                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>WithError</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>错误回调函数</p>

                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/3.%E8%8E%B7%E5%8F%96%E7%9A%84JSON%E6%95%B0%E6%8D%AE%E8%BD%AC%E6%A8%A1%E5%9E%8B"></a>
                <a name="//apple_ref/swift/Section/3.获取的JSON数据转模型" class="dashAnchor"></a>
                <a href="#/3.%E8%8E%B7%E5%8F%96%E7%9A%84JSON%E6%95%B0%E6%8D%AE%E8%BD%AC%E6%A8%A1%E5%9E%8B">
                  <h3 class="section-name">3.获取的JSON数据转模型</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6SinaWb12NetWorkToolsd"></a>
                    <a name="//apple_ref/swift/Method/deinit" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6SinaWb12NetWorkToolsd">deinit</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2016 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2016-05-17)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.6.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
